/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package petstore.exception;

/**
 *
 * @author Tom Hayden
 */
public class BusinessException extends Exception {
    
    private Throwable rootCause = null;
    private String messageKey = null;
    private Object[] messageArgs = null;
    
    public BusinessException() {
        super();
    }
    
    public BusinessException(String messageKeyLoc, Throwable cause, Object[] messageArgsLoc) {
        this.setMessageKey(messageKeyLoc);
        this.setRootCause(cause);
        this.setMessageArgs(messageArgsLoc);
    }
    
    public BusinessException(Throwable cause) {
        this.setRootCause(cause);
    }
    
    public BusinessException(String messageKeyLoc) {
        this.setMessageKey(messageKeyLoc);
    }

    public Throwable getRootCause() {
        return rootCause;
    }

    public void setRootCause(Throwable rootCause) {
        this.rootCause = rootCause;
    }

    public String getMessageKey() {
        return messageKey;
    }

    public void setMessageKey(String messageKey) {
        this.messageKey = messageKey;
    }

    public Object[] getMessageArgs() {
        return messageArgs;
    }

    public void setMessageArgs(Object[] messageArgs) {
        this.messageArgs = messageArgs;
    }
    
}
